<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
namespace app\shop\controller;

class Index extends \app\ApiRest
{
    protected $model;
    protected $article_model;
    public function __construct(\think\App $app)
    {
        parent::__construct($app);
    }
    public function index()
    {
        $dis = ["uniacid" => $this->_uniacid, "status" => 1];
        $data["article"] = $this->article_model->where($dis)->field("id,title")->order("top desc,id desc")->select()->toArray();
        $data["banner"] = $this->model->where($dis)->field("id,img,link")->order("top desc,id desc")->select()->toArray();
        return $this->success($data);
    }
    public function articleInfo()
    {
        $input = $this->_param;
        $dis = ["id" => $input["id"]];
        $data = $this->article_model->dataInfo($dis);
        $data["create_time"] = date("Y-m-d H:i:s", $data["create_time"]);
        return $this->success($data);
    }
    public function configInfo()
    {
        $dis = ["uniacid" => $this->_uniacid];
        $config_model = new \app\massage\model\Config();
        $config = $config_model->dataInfo($dis);
        return $this->success($config);
    }
}

?>